{{ define "index"}}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
    <title>{{ .name }}</title>
    <link rel="icon" type="image/png" href="../static/image/logo.png">
    <link rel="stylesheet" href="../static/css/bulma.min.css">
    <style>
        .content{
            margin-top: 120px;
            min-height: 80vh;
        }
        .footer{
            background-color: #fafafa;
            padding: 3rem 1.5rem 3rem;
        }
    </style>
</head>
<body>
    <div class="container" id="app">
        <nav class="bd-navbar navbar has-shadow is-spaced is-fixed-top"
             role="navigation"
             aria-label="main navigation">
            <div class="navbar-brand">
                <a class="navbar-item" >
                    <img src="../static/image/headLogo.png" width="112" height="30" alt="">
                </a>
                <a role="button"
                   @click="showMenu"
                   ref="burger"
                   class="navbar-burger burger"
                   aria-label="menu"
                   aria-expanded="false"
                   data-target="navbarBasic">
                    <span aria-hidden="true"></span>
                    <span aria-hidden="true"></span>
                    <span aria-hidden="true"></span>
                </a>
            </div>

            <div ref="menu" class="navbar-menu">
                <div class="navbar-start"></div>
                <div class="navbar-end">
                    <div class="navbar-item">
                        <button class="button is-danger is-rounded">反馈</button>
                    </div>
                </div>
            </div>
        </nav>
        <div class="content">
            <h2 class="title">欢迎{{ .ipAddr }} 来到{{ .name}} Api接口首页</h2>
        </div>

        <footer class="footer">
            <div class="has-text-centered">
                <p>
                    黔ICP备17011880号-3 by  <strong>{{ .name }}</strong>
                </p>
            </div>
        </footer>

    </div>
<script src="../static/js/vue.min.js"></script>
<script>
    new Vue({
        el: "#app",
        delimiters: ['${', '}$'],
        methods: {
            showMenu(e) {
                this.$refs.burger.classList.toggle('is-active');
                this.$refs.menu.classList.toggle('is-active');
            },
        }
    })
</script>
</body>
</html>
{{end }}
